/*
 * @Author: Mcc
 * @Date: 2024-07-29 10:17:15
 * @LastEditors: mcc 550539422@qq.com
 * @LastEditTime: 2024-08-09 11:22:39
 * @FilePath: \ft-apply-admin\src\store\index.ts
 * @Description: 
 * 
 * Copyright (c) 2024 by Mcc, All Rights Reserved. 
 */
import type { App } from 'vue'
import { createPinia } from 'pinia'
import { registerPiniaPersistPlugin } from '@/store/plugin/persist'

//pinia能够缓存 刷新不丢失
import piniaPersist from 'pinia-plugin-persistedstate';
const store = createPinia()
store.use(piniaPersist);
registerPiniaPersistPlugin(store)

export function setupStore(app: App<Element>) {
  app.use(store)
}

export { store }
